﻿<%@ Page Language="C#" MasterPageFile="~/Main.Master" AutoEventWireup="true" CodeBehind="CampaignHistoryList.aspx.cs" Inherits="iOak.Web.Administration.CampaignHistoryList" %>

<%@ Register Src="~/Modules/PagerControl.ascx" TagName="PagerControl" TagPrefix="iOak" %>
<asp:Content runat="server" ContentPlaceHolderID="ContentPlaceHolder1">
    <script type="text/javascript">
        $(document).ready(function () {
            $('#<%=txtStartDate.ClientID %>').datepicker();
            $('#<%=txtEndDate.ClientID %>').datepicker();
        });

        function exportClick(id) {
            doPostBack("export", id);
        }

        function doPostBack(name, args) {
            $('#<%=hidEventName.ClientID %>').val(name);
            $('#<%=hidEventArguments.ClientID %>').val(args);
            $('#<%=btnPostBack.ClientID %>').click();
        }

    </script>
    <div class="content">
        <div class="left_bar">
            <div class="left_menu">
                <div class="left_menu_top">
                    搜索
                </div>
                <div class="sub_menu">
                    <table style="padding: 10px">
                        <tr>
                            <td>
                                申报名称
                                <asp:TextBox runat="server" ID="txtSubject"></asp:TextBox>
                            </td>
                        </tr>
                        <tr>
                            <td>
                                申请起始日
                                <asp:TextBox runat="server" ID="txtStartDate"></asp:TextBox>
                            </td>
                        </tr>
                        <tr>
                            <td>
                                申请截止日
                                <asp:TextBox runat="server" ID="txtEndDate"></asp:TextBox>
                            </td>
                        </tr>
                        <tr>
                            <td>
                                <br />
                                <asp:Button runat="server" ID="btnFind" Text="搜索" OnClick="btnFind_Click" CssClass="adminButtonBlue" />
                            </td>
                        </tr>
                    </table>
                </div>
            </div>
        </div>
        <div class="right_bar">
            <div class="right_content">
                <table width="100%" border="0" cellspacing="0" cellpadding="0" style="background-color: #fff;">
                    <tr>
                        <td width="7" align="left" valign="top">
                            <img src="/images/tab-j_01.jpg" width="7" height="7" />
                        </td>
                        <td>
                            <div class="now-pac">
                                您现在的位置：<a href="#">报表</a> &gt; 申报履历</div>
                        </td>
                        <td width="7" align="right" valign="top">
                            <img src="/images/tab-j_02.jpg" width="7" height="7" />
                        </td>
                    </tr>
                    <tr>
                        <td>
                            &nbsp;
                        </td>
                        <td>
                            <div style="border: 1px solid #ccc">
                                <div style="border: 1px solid #fff">
                                    <table width="100%" border="0" cellspacing="0" cellpadding="0" class="tab1">
                                        <tr>
                                            <td>
                                                <div class="table-header">
                                                    <div class="table-header_name" style="float: left">
                                                        申报履历</div>
                                                </div>
                                            </td>
                                        </tr>
                                        <tr>
                                            <td>
                                                <asp:GridView runat="server" ID="gvCampaign" Width="100%" AutoGenerateColumns="false"
                                                    OnRowDataBound="gvCampaign_RowDataBound" CssClass="tab1">
                                                    <HeaderStyle CssClass="tab1_green" />
                                                    <RowStyle CssClass="itemRow" />
                                                    <AlternatingRowStyle CssClass="alternatingRow" />
                                                    <Columns>
                                                        <asp:TemplateField HeaderText="No." ItemStyle-HorizontalAlign="Right" ItemStyle-Width="15px">
                                                            <ItemTemplate>
                                                                <%# gvCampaign.PageIndex * gvCampaign.PageSize + Container.DisplayIndex + 1%>
                                                            </ItemTemplate>
                                                        </asp:TemplateField>
                                                        <asp:BoundField HeaderText="名称" DataField="Subject" ItemStyle-HorizontalAlign="Left" />
                                                        <asp:TemplateField HeaderText="起始日" ItemStyle-Width="70px">
                                                            <ItemTemplate>
                                                                <%# ((DateTime)DataBinder.Eval(Container.DataItem, "StartDate")).ToString("yyyy-MM-dd")%>
                                                            </ItemTemplate>
                                                        </asp:TemplateField>
                                                        <asp:TemplateField HeaderText="截止日" ItemStyle-Width="70px">
                                                            <ItemTemplate>
                                                                <%# ((DateTime)DataBinder.Eval(Container.DataItem, "EndDate")).ToString("yyyy-MM-dd")%>
                                                            </ItemTemplate>
                                                        </asp:TemplateField>
                                                        <asp:TemplateField HeaderText="收到申请数" ItemStyle-HorizontalAlign="Right" ItemStyle-Width="70px">
                                                            <ItemTemplate>
                                                                <asp:Label runat="server" ID="lblReceiveCount"></asp:Label>
                                                            </ItemTemplate>
                                                        </asp:TemplateField>
                                                        <asp:TemplateField HeaderText="符合人数" ItemStyle-HorizontalAlign="Right" ItemStyle-Width="65px">
                                                            <ItemTemplate>
                                                                <asp:Label runat="server" ID="lblMeetCount"></asp:Label>
                                                            </ItemTemplate>
                                                        </asp:TemplateField>
                                                        <asp:TemplateField HeaderText="候选人数" ItemStyle-HorizontalAlign="Right" ItemStyle-Width="65px">
                                                            <ItemTemplate>
                                                                <asp:Label runat="server" ID="lblCandidateCount"></asp:Label>
                                                            </ItemTemplate>
                                                        </asp:TemplateField>
                                                        <asp:TemplateField HeaderText="操作" ItemStyle-Width="40px">
                                                            <ItemTemplate>
                                                                <a href="javascript:exportClick('<%#DataBinder.Eval(Container.DataItem, "CampaignId") %>')">导出</a>
                                                            </ItemTemplate>
                                                        </asp:TemplateField>
                                                    </Columns>
                                                </asp:GridView>
                                            </td>
                                        </tr>
                                        <tr>
                                            <td>
                                                <iOak:PagerControl runat="server" ID="pagerControl" PageIndexChange="pagerControl_PageIndexChange">
                                                </iOak:PagerControl>
                                            </td>
                                        </tr>
                                    </table>
                                </div>
                            </div>
                        </td>
                    </tr>
                </table>
            </div>
        </div>
    </div>
    <asp:Button runat="server" ID="btnPostBack" CssClass="hidden" OnClick="btnPostBack_Click" />
    <asp:HiddenField runat="server" ID="hidEventName" />
    <asp:HiddenField runat="server" ID="hidEventArguments" />
</asp:Content>
